/**
 * 
 */
package com.zznode.client.wlanpolling.model;

import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.zznode.client.wlanpolling.R;

/**
 * 
 *
 */
public class ACInfo extends GeneralInfo {
	
	public String AC_ID;
	public String AC_SN;
	public String AC_IP;
	public String AC_MAC;
	public String AC_DEV_NAME;
	public String AC_LOCAT;
	public String AC_COMPANY;
	public String AC_DEV_TYPE;
	public String AC_AREA_NAME;
	public String AP_TRANSFER_TYPE;
	public String AP_SWITCH;
	public String AP_SWITCH_PORT;
	public String AP_SWITCH_BANDWIDTH;
	
	@Override
	public String getGroupName() {
		return "上联信息：";
	}
	
	@Override
	public int getLayoutID() {
		return R.layout.acinfo;
	}
	
	@Override
	public int getRootID() {
		return R.id.acinfo;
	}
	
	@Override
	public void bind(View root) {
		TextView tv = null;
		EditText et = null;
		tv = (TextView)root.findViewById(R.id.ac_area);
		tv.setText(AC_AREA_NAME);
		tv = (TextView)root.findViewById(R.id.ac_ip);
		tv.setText(AC_IP);
		tv = (TextView)root.findViewById(R.id.ac_mac);
		tv.setText(AC_MAC);
		tv = (TextView)root.findViewById(R.id.ac_name);
		tv.setText(AC_DEV_NAME);
		tv = (TextView)root.findViewById(R.id.ac_address);
		tv.setText(AC_LOCAT);
		tv = (TextView)root.findViewById(R.id.ac_type);
		tv.setText(AC_DEV_TYPE);
		tv = (TextView)root.findViewById(R.id.ac_vendor);
		tv.setText(AC_COMPANY);
		tv = (TextView)root.findViewById(R.id.ac_trantype);
		tv.setText(AP_TRANSFER_TYPE);
		et = (EditText)root.findViewById(R.id.ac_switcher);
		et.setText(AP_SWITCH);
		addTextChangeListener(et, "AP_SWITCH");
		et = (EditText)root.findViewById(R.id.ac_port);
		et.setText(AP_SWITCH_PORT);
		addTextChangeListener(et, "AP_SWITCH_PORT");
		et = (EditText)root.findViewById(R.id.ac_bandwidth);
		et.setText(AP_SWITCH_BANDWIDTH);
		addTextChangeListener(et, "AP_SWITCH_BANDWIDTH");
	}
}
